<template>
	<view class="flex-column view-item">
		<image :style="[imageStyle]" :src="imageSrc" mode="aspectFit"></image>
		<text class="title">{{title}}</text>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: ""
			},
			imageSrc: {
				type: String,
				default: ""
			},
			imageWidth: {
				type: String,
				default: "90rpx"
			},
			imageHeight: {
				type: String,
				default: "90rpx"
			}
		},

		data() {
			return {
				imageStyle: {
					'width': this.imageWidth,
					'height': this.imageHeight
				}
			}
		}
	}
</script>

<style>
	.view-item {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.title {
		margin-top: 4rpx;
		font-size: 24rpx;
		color: #464646;
		font-weight: bold;
		white-space: nowrap;

	}
</style>